package com.cyzy.controller;

import com.cyzy.domain.dto.ResponseData;
import com.cyzy.domain.vo.TOrderVo;
import com.cyzy.service.TOrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @author Honarly
 * @date 2024.11.19
 */
@RestController
@RequestMapping("/order")
@RequiredArgsConstructor
public class TOrderController {

    private final TOrderService tOrderService;

    @GetMapping("/test")
    public String test() {
        return "test";
    }

    @GetMapping("/findByUserId")
    public ResponseData selectByUserId(Integer userId, String status, Integer pageNo, Integer pageSize) {
        return tOrderService.selectByUserId(userId, status, pageNo, pageSize);
    }

}
